package com.ruoyi.web.controller.dc;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.dc.service.DynamicCorrectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * </p>
 *
 * @author liuhl
 * @since 2024-06-25
 */

@RestController
@RequestMapping("/dc/dynamicCorrect")
@Api(value = "DynamicCorrectionController", tags = "大气模型动态修正")
public class DynamicCorrectionController extends BaseController {

    @Resource
    private DynamicCorrectionService dynamicCorrectionService;

    //@PreAuthorize("@ss.hasPermi('dc:dynamicCorrect:testAdd')")
    @ApiOperation(value = "根据时间范围推荐适用的卫星及其高度修订范围", notes = "根据时间范围推荐适用的卫星及其高度修订范围")
    @GetMapping("/getDataByTime")
    public AjaxResult getDataByTime(@ApiParam(value = "开始时间（yyyy-MM-dd HH:mm:ss）", name = "startTime",required = true) @RequestParam("startTime") String startTime,
                                    @ApiParam(value = "结束时间（yyyy-MM-dd HH:mm:ss）", name = "endTime",required = true) @RequestParam("endTime") String endTime) {
        return dynamicCorrectionService.getDataByTime(startTime,endTime);
    }
}
